package com.yunji.common.annotation;

import com.yunji.common.constant.PermissionTypeConstant;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * @author : peter-zhu
 * @date : 2024/11/21 15:41
 * @description : TODO
 **/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DataScope {

    int deep() default 0;

    boolean hasParam() default false;

    @AliasFor("permissionTypes")
    String[] value() default {PermissionTypeConstant.DATA_SCOPE_BELONG};

    @AliasFor("value")
    String[] permissionTypes() default {PermissionTypeConstant.DATA_SCOPE_BELONG};

    boolean children() default false;

    String[] excludeTables() default {};

    String[] scopeTables() default {};
}
